<script setup lang="ts">
import { ref } from "vue";

const titles = ref([
  { label: "标题1", value: "title1" },
  { label: "标题2", value: "title2" },
]);

const activeTitle = ref("title1");
</script>

<template>
  <div class="card">
    <nf-card v-model="activeTitle" :title="titles">
      {{ titles.find((item) => item.value === activeTitle).label }}
    </nf-card>
  </div>
</template>

<style scoped lang="scss">
.card {
  padding: 10px;

  :deep(.nf-card-content) {
    height: 200px;
    padding: 12px;
  }
}
</style>
